<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>【图】${doingDetail.title} – 果果街贴吧</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="keywords" content="果果,果果街,果果网,童装, 淘宝网童装,孕妇装,洗护用品, 母婴用品,儿童美食,家居 ,亲子早教" />
<meta name="description" content="${doingDetail.metaDescription} " />

<%@include file="../common/jscss.jsp" %>
<script type="text/javascript" src="js/web2/joinPictorial.js"></script>
</head>
<body>
<%@include file="../common/header.jsp" %>
<div class="wraper">
	
	<div class="content" style="z-index: 20; position: relative;">
    	<div class="">
            <div class="tiebasub hright">
               <div class="tiebasub_list tiebasubfirst">
                	<h5>贴主最近发表</h5>
                    <ul>
                    <c:forEach items="${doingListByCreatedThisDoing}" var="doingListByC">
                        <li>
                        <a href="forumDc.htm?id=${doingListByC.identifier}" target="_blank">${doingListByC.cutTitle}</a>
                        <span>
                        		<b>(${doingListByC.replyAmount}回应)</b>
                       		    <i><fmt:formatDate value="${doingListByC.gmtCreated}" pattern="MM-dd HH:mm" /></i>
                        </span>
                        </li>
                    </c:forEach>
                    </ul>
                    
                </div>               
                <div class="jinghua">
                	<h5>本吧热帖</h5>
                    <ol>
                    <c:forEach items="${doingHotListByforumId}" var="doingHotList">
                        <li>
                        
                        <a href="forumDc.htm?id=${doingHotList.identifier}" target="_blank">${doingHotList.cutTitle}</a>
                        
                        </li>
                     </c:forEach>
                    </ol>
                </div>
				<div class="tiebasub_imglist">
                	<h5>本吧精彩图片</h5>
                    <ul>
                    <c:forEach items="${doingListIsMarrow}" var="marrowList" >
		                   	 <c:choose>
				                   	 		<c:when test="${fn:length(marrowList.doingPictureList) > 0}">
						                    	<c:forEach items="${marrowList.doingPictureList}" var="marrowPicList" varStatus="marrowPic">
							                    	<c:if test="${marrowPic.index==0}">
							                       		 <li><a href="forumDc.htm?id=${marrowList.identifier}" target="_blank">
							                       		 <img src="${marrowPicList.imageServer}${marrowPicList.pictureThumbnail}_100x100.jpg" width="56px" height="56px" alt="精彩图片"/></a></li>
							                        </c:if>
						                        </c:forEach>
						                      </c:when>  
						                       <c:otherwise>
						                        	<c:forEach items="${marrowList.doingProductList}" var="marrowProList" varStatus="marrowPro">
						                        		<c:if test="${marrowPro.index==0}">
							                       		 <li><a href="forumDc.htm?id=${marrowList.identifier}" target="_blank">
							                       		 <img src="${marrowProList.imageServer}${marrowProList.picThumb}_100x100.jpg" width="56px" height="56px" alt="精彩图片"/></a></li>
							                        </c:if>
						                        	</c:forEach>
						                        
						                      </c:otherwise>
		 					</c:choose>
		              </c:forEach>
                   
                    </ul>
					<div class="clear"></div>   
					<em class="lt"></em><em class="lb"></em><em class="rt"></em><em class="rb"></em>
                </div>
            </div>
            <div class="tiebamain tiebadetailmain">
		            	<div class="tiebabread">
		            	<c:choose>
			            	<c:when test="${member!=null }">
			            		<a href="newForumDoing.htm?forumId=${doingDetail.forumid}" class="fatie right" target="_blank">发帖</a>
			            		</c:when>
			            		<c:otherwise>
									<a class="fatie right" href="javascript:void(0);" onclick="GUOGUO.memberLogin();">发贴</a>
								</c:otherwise>
						</c:choose>
		            		<a href="#">贴吧</a> > <a href="getDoingListByForumId.htm?forumId=${doingDetail.forumid}" target="_blank">${doingDetail.forumName}</a> > <a href="getDoingListByForumId.htm?classId=${doingDetail.classId}&forumId=${doingDetail.forumid}">${doingDetail.className}</a>
		            	</div>
						<dl class="tie_title">
							<dt>
								<a href="#" class="name" onmouseout="GUOGUO.hideFamilyTip()" onmousemove="GUOGUO.familyTip('${doingDetail.memberName}',this)"><p><img src="${doingDetail.memberImageServer}${doingDetail.memberAvatar}" alt="${doingDetail.memberName}"/><span class="shade"></span></p></a>
							</dt>
							<dd>
								<h3>${doingDetail.title}</h3><p>楼主：<a href="#" class="name" onmouseout="GUOGUO.hideFamilyTip()" onmousemove="GUOGUO.familyTip('${doingDetail.memberName}',this)">${doingDetail.memberName}</a></p>
								<p>
									<span>创建于：<fmt:formatDate value="${doingDetail.gmtCreated}" pattern="MM-dd HH:mm" /></span>
									<span>回复：<i>${doingDetail.replyAmount}</i></span><span>浏览：<i>${doingDetail.viewAmount}</i></span>
									
									<c:if test="${member.identifier==doingDetail.member}">
										<a href="updateForumDoingByDoingId.htm?doingId=${doingDetail.identifier}" target="_blank">编辑</a>
									</c:if>
									
								</p>
							</dd>
						</dl>	
						<div class="tie_content">
								<p>${doingDetail.turnReplaceContent}</p>
								<c:forEach  items="${doingDetail.doingPictureList}" var="picDoing">
								<span class="img" style="position: relative;">
									<a href="javascript:;" pictype="1" picproid="${picDoing.identifier}"  class="add_to_album_btn"></a>
									<img src="${picDoing.imageServer}${picDoing.pictureThumbnail}_468xXXX.jpg" alt="${doingDetail.title}"/>
									<p class="checkYTP"><img src="imgs/detail02.png" alt="原图" /> <a href="${picDoing.imageServer}${picDoing.picUrl}" title="" target="_blank">查看原图</a></p>
								</span>	
								<br />
								</c:forEach>	
								<div class="t_l img_thumb">
									<c:forEach items="${doingDetail.doingProductList}" var="doingProduct">
		                                  <li class="pic_b_f r5" style="width: 468px;display: block;cursor: pointer;" >
		              							<div class="pic_b_hd">
							                    <a class="mg_slink ofh" href="outLink.htm?id=${doingProduct.identifier }" rel="nofollow" target="_blank"><c:out value="${doingProduct.name}" /></a>
							                                            
							                        <a href="outLink.htm?id=${doingProduct.identifier }" rel="nofollow" class="buy_it mg_slink" target="_blank">
							                            <span class="g_p"><span>￥${doingProduct.price}</span></span>
							                            <i></i>
							                        </a>
							                                        
							                </div>
											<div class="pic_b_bd" style="cursor: pointer;">
												<a href="javascript:;" picType="2" picproId="${doingProduct.identifier}" class="add_to_album_btn"></a>
												<a href="outLink.htm?id=${doingProduct.identifier }" rel="nofollow" target="_blank"><img src="${doingProduct.imageServer}${doingProduct.picThumb}_468xXXX.jpg"  alt="${doingProduct.name}" /></a>
											</div> 
							                <div class="show_big">
							                    <img src="/img/book_13x13.png" class="big_book" style="right:37px" />
							                    <a class="big_detail" href="dt.htm?id=${doingDetail.identifier}" target="_blank" style="right:10px">详情</a>
							                </div>             
							                                
							                
							            </li>
							            <br />
									</c:forEach>
								</div>
								<div class="glinkb" style="position: relative;">
											<c:choose>
													<c:when test="${member!=null }">
														<a class="link" href="javascript:void(0);" onclick="iLoveU('${doingDetail.identifier}','${doingDetail.owner}',this)">喜欢</a>
													</c:when>
													<c:otherwise>
														<a class="link" href="javascript:void(0);" onclick="GUOGUO.memberLogin();">喜欢</a>
													</c:otherwise>
											</c:choose>
												<span class="lovenum" style="float: left;border: solid 1px #F42481;color: #F42481;padding: 2px 5px 2px 5px;border-radius: 3px 3px 3px 3px;margin-left: 3px;" id="love_count">${doingDetail.doingLoveCount }</span>
											<p>
												<c:choose>
													<c:when test="${member!=null }">
														<a href="javascript:void(0)" class="share" doingId=${doingDetail.identifier} onclick="showShare('${doingDetail.identifier}');">分享</a>
													</c:when>
													<c:otherwise>
														<a class="share" href="javascript:void(0);" onclick="GUOGUO.memberLogin();">分享</a>
													</c:otherwise>
												</c:choose>
												<a href="#bcolor14_lineh" class="comment">回复</a>
												<c:choose>
													<c:when test="${member!=null }">
														<a  href="javascript:void(0);" class="zsend forum_zDoing" id="post_forward" doingId="${doingDetail.identifier}">转发</a> 
													</c:when>
													<c:otherwise>
														<a class="zsend" href="javascript:void(0);" onclick="GUOGUO.memberLogin();">转发</a>
													</c:otherwise>
												</c:choose>
											</p>
											<div class="shareTanchu_y" id="share_${doingDetail.identifier}" style="display: none; margin-left: 145px;margin-top: -80px">
											  <a href="shareWeibo.htm?id=${doingDetail.identifier }&shareType=01" target="_blank"><img src="imgs/loginPic1.png" alt="新浪" />新浪微博</a>
											  <a href="shareWeibo.htm?id=${doingDetail.identifier }&shareType=03" target="_blank"><img src="imgs/loginPic2.png" alt="腾讯"/>腾讯微博</a>
									  		</div>
								</div>	
								 <!--[if ie 6]><div class="clear"></div><![endif]-->							
						</div>
				                <!--[if ie 6]><div class="clear"></div><![endif]-->			
								<em class="lt"></em>
								<em class="lb"></em>
								<em class="rt"></em>
								<em class="rb"></em>
            </div>
			 
			 <div class="tiebamain tiebadetailgap">
            	<div class="tieba_huifu">
					<a href="#bcolor14_lineh" class="huifu left">马上回复</a>
					<span class="right bcolor14"><input type="checkbox" class="" onclick="seePostsMember(this)" name="seePostsMember" <c:if test="${seeOwner}"> checked="checked" </c:if>/> 只看贴主</span>
				</div>
                	
            </div>
			<div class="tiebamain tiebadetailmain huifulist" >
			
			<c:forEach items="${pageModelDoingReplyList.list}" var="replyDoing" varStatus="replyIndex" >
				<dl class="tiezi_huifu" id="doing_li_${replyDoing.identifier}">
						<dt>
							<p>
								<span>${(pageModelDoingReplyList.currentPage-1)*pageModelDoingReplyList.pageSize+replyIndex.index+1}楼</span>
								
								<img src="${replyDoing.memberImageServer}${replyDoing.memberAvatar}" onmouseout="GUOGUO.hideFamilyTip()" onmousemove="GUOGUO.familyTip('${replyDoing.memberName}',this)" alt="${replyDoing.memberName}"/>
								
							</p>
						</dt>
						<dd>
							<p>
							      <a href="#" class="name u_name">${replyDoing.memberName}</a>
							      <c:if test="${replyDoing.memberApproveStatus=='03' }"><img src="imgs/v+.png"  title="达人认证"/></c:if>
							      <!-- <img src="imgs/ico_daren.gif" alt="" /> -->
							      <span><i><fmt:formatDate value="${replyDoing.gmtCreated}" pattern="MM-dd HH:mm" /></i></span>
							</p>
							<p>${replyDoing.turnReplaceContent}&nbsp;</p>
							<c:forEach items="${replyDoing.doingPictureList}" var="replyPic">
									<span class="img" style="position: relative;">
										<a href="javascript:;" pictype="1" picproid="${replyPic.identifier}"  class="add_to_album_btn"></a>
										<img src="${replyPic.imageServer}${replyPic.pictureThumbnail}_468xXXX.jpg" alt="图片"/>
										<p class="checkYTP"><img src="imgs/detail02.png" alt="查看原图" /> <a href="${replyPic.imageServer}${replyPic.picUrl}" title="" target="_blank">查看原图</a></p>
									</span>	
									<br />
							</c:forEach>
							<c:if test="${fn:length(replyDoing.doingProductList) > 0}">
								<div class="t_l img_thumb">
									 <c:forEach items="${replyDoing.doingProductList}" var="replyProduct">
                                          	  <li class="pic_b_f r5" style="width: 468px;display: block;cursor: pointer;" >
	                							<div class="pic_b_hd">
								                    <a class="mg_slink ofh" href="outLink.htm?id=${replyProduct.identifier }" rel="nofollow" target="_blank"><c:out value="${replyProduct.name}" /></a>
								                                            
								                        <a href="outLink.htm?id=${replyProduct.identifier }" rel="nofollow" class="buy_it mg_slink" target="_blank">
								                            <span class="g_p"><span>￥${replyProduct.price}</span></span>
								                            <i></i>
								                        </a>
								                </div>
												<div class="pic_b_bd" style="cursor: pointer;">
													<a href="javascript:;" pictype="2" picproid="${replyProduct.identifier}"  class="add_to_album_btn"></a>
													<a href="outLink.htm?id=${replyProduct.identifier }" rel="nofollow" target="_blank"><img src="${replyProduct.imageServer}${replyProduct.picThumb}_468xXXX.jpg"  alt="${replyProduct.name}" /></a>
												</div> 
								                <div class="show_big">
								                    <img src="/img/book_13x13.png" class="big_book" style="right:37px" alt="详情"/>
								                    <a class="big_detail" href="dt.htm?id=${replyDoing.identifier}" target="_blank" style="right:10px">详情</a>
								                </div>             
								            </li>
								            <br />
									</c:forEach>
								</div>
							</c:if>
							
							
							 <div class="glinkb" style="position: relative;padding-bottom: 10px;">
										 <c:choose>
											<c:when test="${member!=null }">
												<a class="link" href="javascript:void(0);" onclick="iLoveU('${replyDoing.identifier}','${replyDoing.owner}',this)">喜欢</a>
											</c:when>
											<c:otherwise>
												<a class="link" href="javascript:void(0);" onclick="GUOGUO.memberLogin();">喜欢</a>
											</c:otherwise>
										</c:choose>
										<span class="lovenum" style="float: left;border: solid 1px #F42481;color: #F42481;padding: 2px 5px 2px 5px;border-radius: 3px 3px 3px 3px;margin-left: 3px;" id="love_count">${replyDoing.doingLoveCount }</span>
										<p>
											
											<c:forEach items="${forumInformation.memberList}" var="forumMember">
												 <c:if test="${member.identifier==forumMember.identifier}">
														<a href="javascript:void(0);" class="" onclick="deleteDoingByDoingId('${replyDoing.identifier}')">删除</a>
												 </c:if>
										   </c:forEach>
														 
											<c:choose>
													<c:when test="${member!=null}">
														<a href="javascript:void(0)" class="share" doingId=${replyDoing.identifier} onclick="showShare('${replyDoing.identifier}');">分享</a>
													</c:when>
													<c:otherwise>
														<a class="share" href="javascript:void(0);" onclick="GUOGUO.memberLogin();">分享</a>
													</c:otherwise>
											</c:choose>
											<c:choose>
													<c:when test="${member!=null }">
														<a  href="javascript:void(0);" class="zsend forum_zDoing" id="post_forward" doingId="${replyDoing.identifier}">转发</a> 
													</c:when>
													<c:otherwise>
														<a class="zsend" href="javascript:void(0);" onclick="GUOGUO.memberLogin();">转发</a>
													</c:otherwise>
													</c:choose>
											<c:choose>
													<c:when test="${member!=null }">
										 				<a href="javascript:void(0);" class="comment forum_zComment" doingId="${replyDoing.identifier}">评论(${replyDoing.commentCount})</a>
										  			</c:when>
												  	<c:otherwise>
												  		<a class="comment" href="javascript:void(0);" onclick="GUOGUO.memberLogin();">评论(${replyDoing.commentCount})</a>
												  	</c:otherwise>
										  	</c:choose>
										</p>
										<div class="shareTanchu_y" id="share_${replyDoing.identifier }" style="display: none;position: absolute;left: 455px;top: 35px;_left:355px;">
											  <a href="shareWeibo.htm?id=${replyDoing.identifier }&shareType=01" target="_blank"><img src="imgs/loginPic1.png" alt="新浪" />新浪微博</a>
											  <a href="shareWeibo.htm?id=${replyDoing.identifier }&shareType=03" target="_blank"><img src="imgs/loginPic2.png" alt="腾讯"/>腾讯微博</a>
									    </div>
							</div>
							<c:if test="${fn:length(replyDoing.commentExtList) > 0}">
								<div class="commentcon-other" id="comment_show_${replyDoing.identifier}">
										
								
										<c:if test="${replyDoing.commentExtList!= null && fn:length(replyDoing.commentExtList) > 0}">
												<ul>
													<c:forEach items="${replyDoing.commentExtList}" var="comment">
														<li class="clearfix">
															<img onmouseout="GUOGUO.hideFamilyTip()" onmousemove="GUOGUO.familyTip('${comment.commentUserName}',this)" src="${comment.memberImageServer}${comment.memberAvatar}" alt="${comment.commentUserName}" class="face"/>
															<p>
																<a href="#" class="name u_name"><c:out value="${comment.commentUserName}" /></a>：
																	${comment.realContent}（${comment.lastDate}）
															</p>
														</li>
													</c:forEach>
												</ul>
										</c:if>	
								 </div>
							 </c:if>
						</dd>
				</dl>
			</c:forEach>
				<c:if test="${pageModelDoingReplyList.totalPage > 1}">
					<div id="pager" class="h_page"></div>
				</c:if>
	 	 <!--[if ie 6]><div class="clear"></div><![endif]-->	
		       <div class="pl_content_publisherTopbox">
								<div class="bcolor14 lineh" id="bcolor14_lineh">添加回复
								</div>
								<c:choose>
								<c:when test="${doingDetail.isLock==true}">
								<p>上锁帖子，不能回复</p>
								 </c:when>
								 <c:otherwise>
									<div class="pl_content_publisherTop" style="position: relative;z-index: 200">
												<div node-type="wrap" class="send_weibo send_weibo_current">
													<div class="top_border">
														<div style="display: block;" node-type="num" class="num" id="doing_content_error">还能输入<span>140</span>字</div>
													</div>
													<div class="input">
														<div class="bottom_border">
															<textarea onkeyup="GUOGUO.remain('purple_content','doing_content_error',140)"onkeydown="GUOGUO.remain('purple_content','doing_content_error',140)" title="输入框" id="purple_content"></textarea>
														</div>
													</div>
												</div>
												 <div class="weibobtn">
														 <span id="ck_shere"></span>
															<c:set value="0" var="i" />
															 <c:forEach items="${member.outAccountList }" var="outAccount">
																 <c:if test="${outAccount.enabled==true && outAccount.accessToken!=null && outAccount.accessToken!=''}">
																 	<c:if test="${outAccount.outAccountType=='01' }">
																 		<c:set var="i"  value="${i+1 }" />
																		 <img src="imgs/hmenu_weibos.png" />
																	</c:if>
																	<c:if test="${outAccount.outAccountType=='03' }">
																		<c:set var="i"  value="${i+1 }" />
																		 <img src="imgs/ico_qq.gif" />
																	</c:if>
																</c:if> 
															</c:forEach>
															<a href="toOauth.htm" target="_blank">同步设置</a>
															<c:if test="${i>0 }">
																<script>
																	$("#ck_shere").html('<input id="cb_share"  type="checkbox" checked="checked"/>分享到');
																</script>
															</c:if> 
												    <c:choose>
													<c:when test="${member!=null }">
												<input type="button" value="回复" class="sharebtn" onclick="releaseForumDoingReply('${doingDetail.identifier}');" id="replyDoingButton"/>
												</c:when>
												<c:otherwise>
												<input type="button" value="回复" class="sharebtn" onclick="GUOGUO.memberLogin();"/>
												</c:otherwise>
												</c:choose>
												</div>
												 <div node-type="widget" class="blink" style="position: relative;">
													<%@include file="forumDoingReplyFace.jsp"%>
														<c:choose>
																<c:when test="${member!=null }">
																	<img src="imgs/ico_product.gif" /> <a title="商品" node-type="picBtn" class="img" href="javascript:doingProudctDialog();" tabindex="3">商品</a>
																</c:when>
																<c:otherwise>
																	 <img src="imgs/ico_product.gif" /> <a title="商品" node-type="picBtn" class="img" href="javascript:GUOGUO.memberLogin();" tabindex="3">商品</a>
																</c:otherwise>
														</c:choose>
														<c:choose>
																<c:when test="${member!=null }">
																	 <img src="imgs/ico_photo.gif" /> <a title="图片" node-type="picBtn" class="img" href="javascript:doingImgUploadDialog();" tabindex="3">图片</a>
																</c:when>
																<c:otherwise>
																     <img src="imgs/ico_photo.gif" /> <a title="图片" node-type="picBtn" class="img" href="javascript:GUOGUO.memberLogin();" tabindex="3">图片</a>
																</c:otherwise>
														</c:choose>
												</div>					
									</div>
								</c:otherwise>
							  </c:choose>
								<div class="pub_box">
									<ul class="pub_img clearfix" id="doing_product_list"></ul>
			  				   </div>
			  </div>
				 <!--[if ie 6]><div class="clear"></div><![endif]-->	      
				<em class="lt_ind"></em>
				<em class="lb"></em>
				<em class="rt_ind"></em>
				<em class="rb"></em>
            </div>
        </div>
		<div class="clear"></div>
  </div>
  <%@include file="../common/footer.jsp" %>
</div>

<script type="text/javascript">
 $(function(){
	 $("#pager").pager({ pagenumber: ${pageModelDoingReplyList.currentPage}, 
			pagecount: ${pageModelDoingReplyList.totalPage},
			buttonClickCallback: function(page){
				if(${seeOwner!=null}){
					window.location.href="forumDc.htm?id=${doingId}&sMe=${doingDetail.member}&page="+page;
					
				}else{
					window.location.href="forumDc.htm?id=${doingId}&page="+page;
				}
				
			}
	});
	 //加载评论
		$(".forum_zComment").click(function(){
			
			var doingId = $(this).attr("doingId");
			//alert(doingId);
			var dd = $("#doing_li_"+doingId+" dd");
			if(dd.find(".commentstyle").size() < 1){
				dd.append('<div class="commentcon commentstyle" style="display:none;"></div>');
				
			}
			if(dd.find(".commentstyle").is(":hidden")){
				$("#comment_show_"+doingId).hide();
				dd.find(".commentstyle").show().load("meComment.htm?doingId="+doingId);
			}else{
				dd.find(".commentstyle").hide();
				$("#comment_show_"+doingId).show();
			}
			
		}); 
	
	//转发
	$(".forum_zDoing").click(function(){
		GUOGUO.doingForwardDialog(this);
	});
});
	var doingProductList = new ArrayList();
	var doingImgList = new ArrayList();
	//新版本微博保存
	//var kaiguan=1;
	function releaseForumDoingReply(doingId){
		var picture_url = '';
		var picture_thumbnail = '';
		var picture_url2 = '';
		var picture_thumbnail2 = '';
		var picture_url3 = '';
		var picture_thumbnail3 = '';
		var image_server='';
		var isShare=false;
		var documCk=document.getElementById("cb_share");
		if(documCk!=null){
			isShare=documCk.checked;
		}
		if(doingImgList.size()>0){
			for(var i = 0;i < doingImgList.size();i++){
				var doingImg = doingImgList.get(i);
				switch(i){
					case 0:{
						picture_url = doingImg.original;
						picture_thumbnail = doingImg.thumbnail;
						image_server = doingImg.imageServer;
						break;
					}
					case 1:{
						picture_url2 = doingImg.original;
						picture_thumbnail2 = doingImg.thumbnail;
						break;
					}
					case 2:{
						picture_url3 = doingImg.original;
						picture_thumbnail3 = doingImg.thumbnail;
						break;
					}
				}
			}
		}
		var productList = new Array();
		if(doingProductList.size() > 0){
			for(var i = 0; i < doingProductList.size(); i++){
				productList.push(doingProductList.get(i));
			}
		}
		
		var pictureList = new Array();
		if(doingImgList.size() > 0){
			for(var i = 0; i < doingImgList.size(); i++){
				pictureList.push(doingImgList.get(i));
			}
		}
		
		if($("#purple_content").val().length < 1){
			alert("请输入内容！");
			return ;
		}
		else if($("#purple_content").val().length > 140){
				alert("最多可以输入140个字，您输入的太多了");
				return ;
		}else{
			$("#replyDoingButton").attr("onclick","");
		$.post("saveForumDoingAndReply.htm", {
				'content' : $("#purple_content").val(),
				'imageServer':image_server,
				'productList':escape($.toJSON(productList)),
				'pictureUrl':picture_url,
				'pictureThumbnail':picture_thumbnail,
				'pictureUrl2':picture_url2,
				'pictureThumbnail2':picture_thumbnail2,
				'pictureUrl3':picture_url3,
				'pictureThumbnail3':picture_thumbnail3,
				'videoUrl':	$("#doing_video_url").val(),
				'videoPic':	$("#doing_video_pic").val(),
				'ownerType':'family',
				'type':'reply',
				'forumid':'${forumId}',
				'toId': doingId,
				'rootId': doingId,
				'pictureList' : escape($.toJSON(pictureList)),
				isShare: isShare
			}, function(data) {
					$.post("updateDoingReplyAmount.htm", {
						'identifier' : '${doingId}'
					});
					window.location.href="forumDc.htm?id=${doingId}&page="+data;
				
			});}
	}
	
// 新添加的商品信息		
	function doingProudctDialog(){
		$("#lb_pic").remove().hide();	
		if(doingProductList.size() >=3){
			alert("最多只能发布三个商品");
			return ;
		}	
			
		var size = $("#lb_goods").size();	
		if(size < 1){
			$(".blink").append('<div id="lb_goods" class="light_box" style="margin-top: 25px; left: 40px; display: block;position:absolute;z-index:1000000"></div>');
		}
		$("#lb_goods").load("doingProduct.htm").show();
	}
// 添加图片弹出框		
	function doingImgUploadDialog(){
		$("#lb_goods").remove().hide();
		if(doingImgList.size() >=3){
			alert("最多只能发三张图片");
			return ;
		}
		var size = $("#lb_pic").size();	
		if(size < 1){
			$(".blink").append('<div id="lb_pic" class="light_box" style="margin-top: 25px; left: 40px; display: block;position:absolute;z-index:1000000"></div>');
		}
		$("#lb_pic").load("doingImgUploadDialog.htm").show();
	}
//删除商品信息		
	function delDoingProduct(obj){
		$(obj).parent().parent().remove();
		var productNumber = doingProductList.size();
		var delCount = -1;
		for(var i = 0; i < productNumber; i++){
			var picUrl = $(obj).parent().find(".i").attr("src");
			var doingProductI = doingProductList.get(i);
			if(doingProductI.imageServer+doingProductI.picThumb+"_100x100.jpg" == picUrl){
				delCount = i;
			}
		}
		if(delCount != -1){
			doingProductList.remove(delCount);
		}
	}
//删除上传图片信息
	function delDoingImg(obj){
		$(obj).parent().parent().remove();
		var productNumber = doingImgList.size();
		var delCount = -1;
		for(var i = 0; i < productNumber; i++){
			var picUrl = $(obj).parent().find(".i").attr("src");
			var doingImg = doingImgList.get(i);
			if((doingImg.imageServer+doingImg.thumbnail+"_100x100.jpg") == picUrl){
				delCount = i;
			}
		}
		if(delCount != -1){
			doingImgList.remove(delCount);
		}
	}
	//只看帖主
	function seePostsMember(obj){
		 $(":checkbox[name='seePostsMember']").each(function() {
				if ($(this).attr("checked")) {
					window.location.href="forumDc.htm?id=${doingId}&sMe=${doingDetail.member}";
				}else{
					window.location.href="forumDc.htm?id=${doingId}";
				}
			});
		
	}
	//删除回复
	function deleteDoingByDoingId(replyDoingId){
		
		$.post("deleteDoingByDoingId.htm", {
			replyDoingId : replyDoingId,
			doingId: '${doingId}'
		}, function(data) {
			if (data == 'success') {
				hideMask();
				window.location.href="forumDc.htm?id=${doingId}";
			}
		});
		
	}
	//喜欢
	function iLoveU(replyDoing,family,obj){
		GUOGUO.loveDoing(replyDoing,family,obj);
		
	}
	function showShare(id){
		$("#share_"+id).toggle();
	}
 
</script>
</body>
</html>
